#include <stdio.h>
#include <stdlib.h>
#include <string.h>


int main( int argc, const char* argv[] )
{
	FILE *fp;
	char buf[1024];
		
	if(fp = popen("ls", "r"))
	{
		while(0 < fscanf( fp, "%s", buf)){
			//printf("\n%s, %d", buf, strncmp(buf, "Mk.tst", 6));
			printf("\n%s, %d", buf, strcmp(buf, "Mk.tst"));
/*
			if(strcmp(buf, "Mk.tst") == 0)
			{
				printf("\n Exist Mk.tst file");
				break;
			}
*/
			}
	}
	
	pclose(fp);
	return -1;	
}




